import request from "../utils/axios/requerst";
import { TopPlayType, songDetailVo } from "@/types/apiType";
// 首页轮播图
const getBanner = async () => {
  return await request.get({ url: "/banner" });
};
//热门歌单分类
const hotSongSheet = () => {
  return request.get({ url: "/playlist/hot" });
};

//歌单 ( 网友精选碟 )
const topPlaySong = (params: TopPlayType) => {
  return request.get({ url: "/top/playlist", params });
};
//获取歌单详情
const topPlaySongDetail = (params: songDetailVo) => {
  return request.get({ url: "/playlist/detail", params });
};
//获取歌词
const topPlaySongLyric = (id: number) => {
  return request.get({ url: `/lyric?id=${id}` });
};
// 获取歌音频
const songUrl = (ids: string, level: string) => {
  return request.get({ url: `/song/url/v1?id=${ids}&level=${level}` });
};

//mv
const mvSong = (params: Object) => {
  return request.get({ url: "/mv/all", params });
};
export {
  getBanner,
  hotSongSheet,
  topPlaySong,
  mvSong,
  topPlaySongDetail,
  topPlaySongLyric,
  songUrl,
};
